' Crispy1 (Kings on top, Queens on the side, and Jacks in the corners)
' A diversion by Chris Pando
' IF IT IS SQUINKY, THEN YOU KNOW IT IS BrilligWare!
'
' I dedicate this program to the public domain.
'
DefInt A-Z
Declare Function CardVersion Lib "VBCards.dll" () As Integer
Declare Sub GetCard Lib "VBCards.dll" (ByVal Card As Integer)
Declare Sub GetCardBack Lib "VBCards.dll" (ByVal C As Integer)
Declare Sub GetCardMisc Lib "VBCards.dll" (ByVal C As Integer)
Declare Function SameCardValue Lib "VBCards.dll" (ByVal C1 As Integer, ByVal C2 As Integer) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpAppName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lpFileName As String) As Integer
Const TRUE = -1
Const FALSE = 0
Const PIXEL = 3
Const ROYALMOD = 13
Const KING = 0
Const QUEEN = 12
Const JACK = 11
Const KING1 = 1 ' valid squares for face cards
Const KING2 = 2
Const KING3 = 13
Const KING4 = 14
Const QUEEN1 = 4
Const QUEEN2 = 7
Const QUEEN3 = 8
Const QUEEN4 = 11
Const JACK1 = 0
Const JACK2 = 3
Const JACK3 = 12
Const JACK4 = 15
Const CENTER1 = 5 'symbolic values for the center squares
Const CENTER2 = 6
Const CENTER3 = 9
Const CENTER4 = 10
Const CLOSEDFIELD = 1 ' here are the various states
Const OPENFIELD = 2
Const APENDING = 3
Const CPENDING = 4
Dim Deck(1 To 52) As Integer 'Deck contains the deal
Dim Field(15) As Integer 'Field contains the playing field
' State Variables
Dim FromCard As Integer 'Contains Card to Match
Dim NumberOpen As Integer 'open places on field
Dim NextCard As Integer 'Pointer to Deck
Dim State As Integer 'Current State
Dim BackDesign As Integer 'Card Back
Sub AppExit ()
WriteProfile
End
End Sub
Sub CenterCtlBottom (Source As Form, Ctl As Control, Alt As Integer)
' center control a specified distance above the bottom of the form